#ifndef WAITWIDGET_H
#define WAITWIDGET_H

#include <QWidget>
#include <QMovie>
#include <QLabel>

class WaitWidget : public QWidget
{
    Q_OBJECT
public:
    explicit WaitWidget(QWidget *parent = nullptr);
    ~WaitWidget();
public:
    void movebyParent();
    void resizebyParent();
    QColor getBackgroundColor() const;
    void setBackgroundColor(const QColor &value);

    QString getLoadingPath() const;
    void setLoadingPath(const QString &value);

    QString getLoadingText() const;
    void setLoadingText(const QString &value);

    QString getLoadingTextColor() const;
    void setLoadingTextColor(const QString &value);

    QFont getLoadingTextFont() const;
    void setLoadingTextFont(const QFont &value);
private:
    QColor backgroundColor;

    QString loadingPath;
    QString loadingText;
    QString loadingTextColor;
    QFont loadingTextFont;
private:
    QMovie *movie;
    QLabel *textLabel;
    QLabel *movieLabel;
protected:
    void resizeEvent(QResizeEvent *event);
    void paintEvent(QPaintEvent *event);
};

#endif // WAITWIDGET_H
